package com.example.jvm_jdk11.controller;

import com.example.jvm_jdk11.pojo.User;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/jvm")
public class JvmController {

    private static List<User> list = new ArrayList<>();

    @RequestMapping("/jvm-test")
    public String jvmTest(@RequestBody User user) {
        for (int i = 0; i < 1000000; i++) {
            list.add(user);
        }
        return "success";
    }


}
